#include<stdio.h>
int main(){

	int arr[20];
	
	for (int i=0;i<20;i++){
		scanf("%d",&arr[i]);
	}
	
	int max = arr[0],min = arr[0];
	
	for (int j=1;j<20;j++){
		if (arr[j] > max){
			max = arr[j];
		}else if (arr[j] < min){
			min = arr[j];
		}
	}
	
	int sum=0;
	 
	for (int k=0;k<20;k++){
		sum +=arr[k];
	}
	float avg = (sum - max -min) / 18.0;
	printf("去掉一个最高分:%d分\n去掉一个最低分:%d分\n8号选手最后得分:%f分",max,min,avg);
	return 0;
}
